At present, intelligent terminals become increasingly popular. There are a large amount of hardware on an intelligent terminal, such as a light sensing module, a positioning and navigation module, a barometer, an acceleration sensor, a temperature sensor, and a gyroscope. The hardware is usually used in combination with an application program. In practice, only when an intelligent terminal detects that a user uses an application program that needs to invoke hardware, and the application program receives no response, can the intelligent terminal identify that a fault may occur in the hardware and consequently the application program that invokes the hardware cannot be used normally. This type of hardware fault identification is passive, and the intelligent terminal cannot actively identify whether the hardware runs abnormally.
In the prior art, to enable an intelligent terminal to actively identify whether hardware runs abnormally, an application program for checking hardware performance needs to be run at an application layer of the intelligent terminal. The intelligent terminal can acquire, by invoking the application program, current performance and a working status of hardware according to a value transferred by a device driver, so as to determine whether the hardware runs normally.
To some extent, the method can identify a hardware error. However, the application program for checking hardware performance needs to be pre-installed at the application layer of the intelligent terminal. If the application program is not pre-installed or is not invoked after installation, the intelligent terminal cannot actively identify a hardware exception.